All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.OverlayLayout
java.lang.Object
|
+----com.sun.java.swing.OverlayLayout
- public class OverlayLayout
- extends Object
- implements LayoutManager2, Serializable
A layout manager to arrange components over the top
of each other. The requested size of the container
will be the largest requested size of the children,
taking alignment needs into consideration.
The alignment is based upon what is needed to properly
fit the children in the allocation area. The children
will be placed such that their alignment points are all
on top of each other.
Warning: serialized objects of this class will not be compatible with
future swing releases. The current serialization support is appropriate
for short term storage or RMI between Swing1.0 applications. It will
not be possible to load serialized Swing1.0 objects with future releases
of Swing. The JDK1.2 release of Swing will be the compatibility
baseline for the serialized form of Swing objects.
-
OverlayLayout(Container)
- Constructs a layout manager that performs overlay
arrangment of the children.
-
addLayoutComponent(Component, Object)
- Adds the specified component to the layout, using the specified
constraint object.
-
addLayoutComponent(String, Component)
- Adds the specified component to the layout.
-
getLayoutAlignmentX(Container)
- Returns the alignment along the x axis for the container.
-
getLayoutAlignmentY(Container)
- Returns the alignment along the y axis for the container.
-
invalidateLayout(Container)
- Indicates a child has changed its layout related information,
which causes any cached calculations to be flushed.
-
layoutContainer(Container)
- Called by the AWT when the specified container needs to be laid out.
-
maximumLayoutSize(Container)
- Returns the minimum dimensions needed to lay out the components
contained in the specified target container.
-
minimumLayoutSize(Container)
- Returns the minimum dimensions needed to lay out the components
contained in the specified target container.
-
preferredLayoutSize(Container)
- Returns the preferred dimensions for this layout given the components
in the specified target container.
-
removeLayoutComponent(Component)
- Removes the specified component from the layout.
OverlayLayout
public OverlayLayout(Container target)
- Constructs a layout manager that performs overlay
arrangment of the children. The layout manager
created is dedicated to the given container.
- Parameters:
- target - The container to do layout against.
invalidateLayout
public void invalidateLayout(Container target)
- Indicates a child has changed its layout related information,
which causes any cached calculations to be flushed.
- Parameters:
- target - the container
addLayoutComponent
public void addLayoutComponent(String name,
Component comp)
- Adds the specified component to the layout. Not used by this class.
- Parameters:
- name - the name of the component
- comp - the the component to be added
removeLayoutComponent
public void removeLayoutComponent(Component comp)
- Removes the specified component from the layout. Not used by
this class.
- Parameters:
- comp - the component to remove
addLayoutComponent
public void addLayoutComponent(Component comp,
Object constraints)
- Adds the specified component to the layout, using the specified
constraint object.
- Parameters:
- comp - the component to be added
- constraints - where/how the component is added to the layout.
preferredLayoutSize
public Dimension preferredLayoutSize(Container target)
- Returns the preferred dimensions for this layout given the components
in the specified target container. Recomputes the layout if it
has been invalidated. Factors in the current inset setting returned
by getInsets().
- Parameters:
- target - the component which needs to be laid out
- Returns:
- a Dimension object containing the preferred dimensions
- See Also:
- target, minimumLayoutSize
minimumLayoutSize
public Dimension minimumLayoutSize(Container target)
- Returns the minimum dimensions needed to lay out the components
contained in the specified target container. Recomputes the layout
if it has been invalidated, and factors in the current inset setting.
- Parameters:
- target - the component which needs to be laid out
- Returns:
- a Dimension object containing the minimum dimensions
- See Also:
- preferredLayoutSize
maximumLayoutSize
public Dimension maximumLayoutSize(Container target)
- Returns the minimum dimensions needed to lay out the components
contained in the specified target container. Recomputes the
layout if it has been invalidated, and factors in the inset setting
returned by getInset().
- Parameters:
- target - the component which needs to be laid out
- Returns:
- a Dimension object containing the maximum dimensions
- See Also:
- preferredLayoutSize
getLayoutAlignmentX
public float getLayoutAlignmentX(Container target)
- Returns the alignment along the x axis for the container.
If the major axis of the box is the x axis the default
alignment will be returned, otherwise the alignment needed
to place the children along the x axis will be returned.
- Parameters:
- target - the container
- Returns:
- the alignment >= 0.0f && <= 1.0f
getLayoutAlignmentY
public float getLayoutAlignmentY(Container target)
- Returns the alignment along the y axis for the container.
If the major axis of the box is the y axis the default
alignment will be returned, otherwise the alignment needed
to place the children along the y axis will be returned.
- Parameters:
- target - the container
- Returns:
- the alignment >= 0.0f && <= 1.0f
layoutContainer
public void layoutContainer(Container target)
- Called by the AWT when the specified container needs to be laid out.
- Parameters:
- target - the container to lay out
- Throws: AWTError
- if the target isn't the container specified to the
BoxLayout constructor
All Packages Class Hierarchy This Package Previous Next Index